<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body></body>
  <script>
    // let arr = [1, 2, 3, 4, 5];
    // let res = arr.find(function(item) {
    //   return item == 200;
    //   // console.log(item);
    //   // return true;
    // });
    // console.log(res);
    let lessons = [{ name: "js" }, { name: "css" }, { name: "mysql" }];
    // console.log(lessons.includes({ name: "css" }));
    // let status = lessons.find(function(item) {
    //   return item.name == "css";
    // });
    // console.log(status);
    let index = lessons.findIndex(function(item) {
      return item.name == "mysql";
    });
    console.log(index);
  </script>
</html>
